﻿using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
namespace INTEX.DataBase.Tools
{
    public partial class INTEXDBC
    {
        public DataSet QueryICC_FBST(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    break;
                case 2:
                    or1.CommandText = "SELECT * FROM FBST  "
                            + " WHERE FBMANDANT=:FBMANDANT AND FBART=:FBART AND FBVAR=:FBVAR AND FBFARBE=:FBFARBE AND FBGROE=:FBGROE";
                    or1.Parameters.Add("FBMANDANT", OracleType.NVarChar).Value = dwData["FBMANDANT"].ToString();
                    or1.Parameters.Add("FBART", OracleType.NVarChar).Value = dwData["FBART"].ToString();
                    or1.Parameters.Add("FBVAR", OracleType.NVarChar).Value = dwData["FBVAR"].ToString();
                    or1.Parameters.Add("FBFARBE", OracleType.NVarChar).Value = dwData["FBFARBE"].ToString();
                    or1.Parameters.Add("FBGROE", OracleType.NVarChar).Value = dwData["FBGROE"].ToString();
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "ICC_FBST";
            Return = Result;
            return Return;
        }
    }
}
